package com.vogue.meeting.fluent.entity;

import cn.org.atool.fluent.mybatis.annotation.FluentMybatis;
import cn.org.atool.fluent.mybatis.annotation.GmtCreate;
import cn.org.atool.fluent.mybatis.annotation.GmtModified;
import cn.org.atool.fluent.mybatis.annotation.TableField;
import cn.org.atool.fluent.mybatis.annotation.TableId;
import cn.org.atool.fluent.mybatis.base.RichEntity;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

import java.time.LocalDateTime;
import java.util.Date;

/**
 * MeetingEntity: 数据映射实体定义
 *
 * @author Powered By Fluent Mybatis
 */
@SuppressWarnings({"rawtypes", "unchecked"})
@Data
@Accessors(
    chain = true
)
@EqualsAndHashCode(
    callSuper = false
)
@AllArgsConstructor
@NoArgsConstructor
@FluentMybatis(
    table = "meeting",
    schema = "db_meeting",
    desc = "会议"
)
public class MeetingEntity extends RichEntity {
  private static final long serialVersionUID = 1L;

  @TableId(
      value = "meeting_id",
      desc = "会议ID"
  )
  private Integer meetingId;

  @TableField(
      value = "meeting_code",
      desc = "会议码"
  )
  private String meetingCode;

  @TableField(
      value = "meeting_content",
      desc = "会议内容"
  )
  private String meetingContent;

  @TableField(
      value = "meeting_name",
      desc = "会议名称"
  )
  private String meetingName;

  @TableField(
      value = "meeting_status",
      desc = "会议状态"
  )
  private String meetingStatus;

  @TableField(
      value = "number_limit",
      desc = "人数限制"
  )
  private Integer numberLimit;

  @TableField(
      value = "start_time",
      desc = "开始时间"
  )
  private LocalDateTime startTime;

  @TableField(
      value = "create_time",
      insert = "now()",
      desc = "创建时间"
  )
  @GmtCreate
  private LocalDateTime createTime;

  @TableField(
      value = "update_time",
      insert = "now()",
      update = "now()",
      desc = "更新时间"
  )
  @GmtModified
  private LocalDateTime updateTime;

  @Override
  public final Class entityClass() {
    return MeetingEntity.class;
  }
}
